﻿<%@ Register TagPrefix="ucCommon" TagName="Common" Src="../Common/Inc/Common.ascx" %>
<%@ Register TagPrefix="ucComment" TagName="Comment" Src="../Common/Inc/Comment.ascx" %>
<%@ Register TagPrefix="ucTop" TagName="Top" Src="../Common/Inc/Top.ascx" %>
<%@ Register TagPrefix="ucMenu" TagName="Menu" Src="../Common/Inc/Menu.ascx" %>
<%@ Register TagPrefix="ucTabTitle" TagName="TabTitle" Src="../Common/Inc/TabTitle.ascx" %>
<%@ Register TagPrefix="ucCopyright" TagName="Copyright" Src="../Common/Inc/Copyright.ascx" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Fit1011m.aspx.cs" Inherits="Updms.Fit.Fit1011m" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>▒ UPDMS [Fit1011m] ▒▒▒▒▒▒▒▒▒▒</title>
<ucCommon:Common id="Common" runat="server"></ucCommon:Common>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server" id="ScriptManager1" EnableScriptGlobalization="true"></asp:ScriptManager>

<table id="table_frame">
<tr>
	<td id="top_area" colspan="2">
		<!-- Top 시작 -->
		<ucTop:Top id="Top" runat="server"></ucTop:Top>
		<!-- Top 끝 -->	
	</td>
</tr>
<tr>
	<td id="menu_area" runat="server">
		<!-- 메뉴 시작 -->
		<ucMenu:Menu id="Menu" runat="server"></ucMenu:Menu>
		<!-- 메뉴 끝 -->	
	</td>
	<td id="contents_area">
		<!-- 제목 시작 -->
		<ucTabTitle:TabTitle id="TabTitle" TagPrefixs="Fit1011m" runat="server"></ucTabTitle:TabTitle>
		<!-- 제목 끝 -->
		<!-- AJAX 시작 -->
		<asp:UpdatePanel ID="UpdatePanel1" runat="server">
		<Triggers>
			<asp:PostBackTrigger ControlID="ibtn_excel"/>
			<asp:PostBackTrigger ControlID="ibtn_save"/>
		</Triggers>
		<ContentTemplate>
		<!-- 버튼 시작 -->
		<div class="button_area">
			<asp:linkbutton id="ibtn_excel" Text="엑셀" runat="server" CssClass="ibtn ibtn_excel" OnClick="ibtn_excel_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_favorite" Text="즐겨찾기" runat="server" CssClass="ibtn ibtn_favorite"></asp:linkbutton>
			<asp:linkbutton id="ibtn_close" Text="닫기" runat="server" CssClass="ibtn ibtn_close" OnClientClick="javascript:window.close();return false;"></asp:linkbutton>
			<asp:linkbutton id="ibtn_move" Text="변경" runat="server" CssClass="ibtn ibtn_move" OnClientClick="chkChange();return false;"></asp:linkbutton>
			<asp:linkbutton id="ibtn_delete" Text="삭제" runat="server" CssClass="ibtn ibtn_delete" OnClientClick="return chkDelete()" OnClick="ibtn_delete_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_save" Text="저장" runat="server" CssClass="ibtn ibtn_save" OnClientClick="return chkSave()" OnClick="ibtn_save_Click"></asp:linkbutton>
			<asp:linkbutton id="ibtn_search" Text="검색" runat="server" CssClass="ibtn ibtn_search" OnClientClick="return chkSearch(event)" OnClick="ibtn_search_Click"></asp:linkbutton>
		</div>
		<!-- 버튼 끝 -->
		<!-- 검색 시작 -->
		<table class="table_search">
		<tr>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_training_dt" Text="운동일" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_search_training_dt_from" runat="server" CssClass="ib_b_dt"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_search_training_dt_from" class="ci_calendar" runat="server">&nbsp;~&nbsp;<asp:textbox id="txt_search_training_dt_to" runat="server" CssClass="ib_b_dt"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_search_training_dt_to" class="ci_calendar" runat="server" /></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_training_part" Text="운동부위" runat="server" /></td>
			<td class="ctl" width="11%"><img src="../Common/Images/application_form.png" align="absmiddle" alt="multi_check" class="hand" onclick="showHiddenDiv('div_search_training_part', event);" /></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_training_type" Text="운동종류" runat="server" /></td>
			<td class="ctl" width="11%"><img src="../Common/Images/application_form.png" align="absmiddle" alt="multi_check" class="hand" onclick="showHiddenDiv('div_search_training_type', event);" /></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_search_location" Text="장소" runat="server" /></td>
			<td class="ctl" width="11%"><asp:textbox id="txt_search_location" runat="server" Width="96%" CssClass="ib_b"></asp:textbox></td>
		</tr>
		</table>
		<!-- 검색 끝 -->
		<!-- 페이지모드 전환버튼 시작 -->
		<div class="page_mode_area">
			<span id="btn_converter" title="운동결과 변환기" class="sbtn sbtn_converter" onclick="return goTrainingResultConverterPage();"></span>
			<span id="btn_chg_mode" onclick="return chgMode();" runat="server"></span>
			<span id="btn_init_mode" title="초기화" class="sbtn sbtn_init" onclick="return initDetail();"></span>
		</div>
		<!-- 페이지모드 전환버튼 끝 -->
		<!-- 디테일1 시작 -->
		<table class="table_detail">
		<tr>
			<td class="lbl" width="11%"><asp:Literal id="ltr_training_id" Text="운동ID" runat="server" /></td>
			<td class="ctl" width="11%"><asp:label id="lbl_training_id" runat="server" Width="100%" Font-Bold="True"></asp:label></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_training_dt" Text="운동일" runat="server" /></td>
			<td class="ctl" width="33%"><asp:textbox id="txt_training_dt" runat="server" CssClass="ib_b_dt req"></asp:textbox>&nbsp;<img src="../Common/Images/calendar.png" id="ci_training_dt" class="ci_calendar" runat="server" />&nbsp;&nbsp;&nbsp;&nbsp;<asp:DropDownList id="ddl_start_hour" runat="server" CssClass="ddl" Width="50"></asp:DropDownList>&nbsp;:&nbsp;<asp:DropDownList id="ddl_start_minute" runat="server" CssClass="ddl" Width="50"></asp:DropDownList>&nbsp;~&nbsp;<asp:DropDownList id="ddl_end_hour" runat="server" CssClass="ddl" Width="50"></asp:DropDownList>&nbsp;:&nbsp;<asp:DropDownList id="ddl_end_minute" runat="server" CssClass="ddl" Width="50"></asp:DropDownList></td>
			<td class="lbl" width="11%"><asp:Literal id="ltr_location" Text="장소" runat="server" /></td>
			<td class="ctl" width="22%"><asp:textbox id="txt_location" runat="server" Width="98%" CssClass="ib_b"></asp:textbox></td>
		</tr>
		</table>
		<!-- 디테일1 끝 -->
		<!-- 디테일2 시작 -->
		<ul class="horizontal">
			<li style="width:30%;"><div class="sub_title_icon"><asp:Literal id="ltr_stitle_training_result" Text="운동결과" runat="server" /><asp:checkbox id="cb_part_list_all" runat="server" AutoPostBack="True" OnCheckedChanged="cb_part_list_all_CheckedChanged" ToolTip="Show All" style="position:relative;top:2px;left:4px;"></asp:checkbox></div></li>
			<li style="width:70%;"><div style="float:right;"><asp:CheckBoxList id="cbl_training_part" runat="server" RepeatDirection="Horizontal" CssClass="cbl_flow" AutoPostBack="true" onselectedindexchanged="cbl_training_part_SelectedIndexChanged" ToolTip="Show All"></asp:CheckBoxList></div></li>
		</ul>
		<div class="div_scroll" style="height:27px; overflow-y:scroll;">
		<table class="table_gridview">
			<tr>
				<th width="2%">S</th>
				<th width="4%"><asp:Literal id="ltr_grid_no" Text="번호" runat="server" /></th>
				<th width="10%"><asp:Literal id="ltr_grid_training_part" Text="운동부위" runat="server" /></th>
				<th width="26%"><asp:Literal id="ltr_grid_training_nm" Text="운동명" runat="server" /></th>
				<th width="10%"><asp:Literal id="ltr_grid_action_weight" Text="중량" runat="server" /></th>
				<th width="10%"><asp:Literal id="ltr_grid_action_count" Text="반복횟수" runat="server" /></th>
				<th width="10%"><asp:Literal id="ltr_grid_set_count" Text="세트" runat="server" /></th>
				<th width="24%"><asp:Literal id="ltr_grid_remark" Text="비고" runat="server" /></th>
				<th width="4%"><asp:Literal id="ltr_grid_summary" Text="요약" runat="server" /></th>
			</tr>
		</table>
		</div>
		<div class="div_scroll" style="height:230px; overflow-y:scroll;" onscroll="javascript:setScroll(this);" id="div_detail_2" runat="server">
		<table id="table_parts" cellspacing="0" cellpadding="0" width="100%" border="0" runat="server">
			<tr>
				<td>
					<asp:GridView ID="gv_parts" CssClass="table_gridview_no_header" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="gv_parts_RowDataBound" DataKeyNames="Seq,Training_Part,Training_Id,Training_Type_Id,Save_Yn,Weight_Calc_Rate" ShowHeader="False">
						<Columns>
							<asp:TemplateField HeaderText="S">
								<ItemTemplate>
									<asp:CheckBox ID="cb_select" runat="server" AutoPostBack="True" OnCheckedChanged="cb_select_CheckedChanged" />
								</ItemTemplate>
								<ItemStyle HorizontalAlign="Center" Width="2%" />
							</asp:TemplateField>
							<asp:BoundField HeaderText="번호" DataField="Rnum" >
								<ItemStyle HorizontalAlign="Center" Width="4%" />
							</asp:BoundField>
							<asp:BoundField DataField="Seq" HeaderText="Seq(X)" Visible="False" />
							<asp:BoundField DataField="Training_Part" HeaderText="Training_Part(X)" Visible="False" />
							<asp:BoundField HeaderText="운동부위" DataField="Training_Part_Nm" HtmlEncode="False" >
								<ItemStyle HorizontalAlign="Center" Width="10%" />
							</asp:BoundField>
							<asp:BoundField HeaderText="운동명" DataField="Training_Nm" HtmlEncode="False" >
								<ItemStyle HorizontalAlign="Left" Width="26%" />
							</asp:BoundField>
							<asp:TemplateField HeaderText="중량">
								<ItemTemplate>
									<asp:TextBox ID="txt_action_weight" runat="server" CssClass="ib_b_sR" Enabled="False" Text='<%# Bind("Action_Weight") %>' Width="98%"></asp:TextBox>
								</ItemTemplate>
								<ItemStyle Width="10%" HorizontalAlign="Right" />
							</asp:TemplateField>
							<asp:TemplateField HeaderText="반복횟수">
								<ItemTemplate>
									<asp:TextBox ID="txt_action_count" runat="server" CssClass="ib_b_sR" Enabled="False" Text='<%# Bind("Action_Count") %>' Width="98%"></asp:TextBox>
								</ItemTemplate>
								<ItemStyle Width="10%" HorizontalAlign="Right" />
							</asp:TemplateField>
							<asp:TemplateField HeaderText="세트">
								<ItemTemplate>
									<asp:TextBox ID="txt_set_count" runat="server" CssClass="ib_b_sR" Enabled="False" Text='<%# Bind("Set_Count") %>' Width="98%"></asp:TextBox>
								</ItemTemplate>
								<ItemStyle Width="10%" HorizontalAlign="Right" />
							</asp:TemplateField>
							<asp:TemplateField HeaderText="비고">
								<ItemTemplate>
									<asp:TextBox ID="txt_remark" TextMode="MultiLine" runat="server" CssClass="tb_scroll" Height="12" Enabled="False" Text='<%# Bind("Remark") %>' Width="96%"></asp:TextBox>
								</ItemTemplate>
								<ItemStyle HorizontalAlign="Left" Width="22%" />
							</asp:TemplateField>
							<asp:TemplateField HeaderText="확장">
								<ItemTemplate>
									<asp:CheckBox ID="cb_remark" runat="server"></asp:CheckBox>
								</ItemTemplate>
								<ItemStyle Width="2%" HorizontalAlign="Center" />
							</asp:TemplateField>
							<asp:BoundField HeaderText="요약" DataField="Summary" HtmlEncode="False" >
								<ItemStyle HorizontalAlign="Center" Width="4%" />
							</asp:BoundField>
							<asp:BoundField DataField="Save_Yn" HeaderText="Save_Yn(X)" Visible="False" />
							<asp:BoundField DataField="Weight_Calc_Rate" HeaderText="Weight_Calc_Rate(X)" Visible="False" />
						</Columns>
					</asp:GridView>
				</td>
			</tr>
		</table>
		</div>
		<div class="div_scroll" style="height:33px; overflow-y:scroll;">
		<table class="table_gridview">
			<tr>
				<td width="2%" class="total"></td>
				<td width="4%" class="total"></td>
				<td width="10%" class="total"></td>
				<td width="26%" class="total"><asp:linkbutton id="lbtn_calc_total" runat="server" OnClick="lbtn_calc_total_Click" Font-Underline="true" Text="Total" /></td>
				<td width="10%" class="money"><asp:Literal id="ltr_calc_action_weight" Text="0" runat="server" /></td>
				<td width="10%" class="money"><asp:Literal id="ltr_calc_action_count" Text="0" runat="server" /></td>
				<td width="10%" class="money"><asp:Literal id="ltr_calc_set_count" Text="0" runat="server" /></td>
				<td width="24%" class="total"></td>
				<td width="4%" class="total"></td>
			</tr>
		</table>
		</div>
		<!-- 디테일2 끝 -->
		<div style="height:20px;"></div>
		<!-- 리스트셋 시작 -->
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tr>
			<td>
				<!-- 검색어 시작 -->
				<div class="div_left">Keyword : <asp:label id="lbl_search_keyword" runat="server"></asp:label></div>
				<div class="div_right"><asp:checkbox id="cb_list_all" runat="server" AutoPostBack="True" OnCheckedChanged="cb_list_all_CheckedChanged" ToolTip="Show All"></asp:checkbox></div>
				<!-- 검색어 끝 -->
			</td>
		</tr>
		<tr>
			<td>
				<!-- 리스트 시작 -->
				<asp:GridView ID="GridView1" CssClass="table_gridview" GridLines="None" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" DataKeyNames="Seq,Start_Hour,Start_Minute,End_Hour,End_Minute,Training_Part" ShowFooter="True">
					<Columns>
						<asp:TemplateField HeaderText="&lt;a href=&quot;javascript:void(0);&quot; onclick=&quot;checkBoxCheck('GridView1');&quot;&gt;S&lt;/a&gt;">
							<ItemTemplate>
								<input id="cb_check" class="cb" type="checkbox" onclick="reverseRow('GridView1', 0);" runat="server" />
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Width="2%" />
						</asp:TemplateField>
						<asp:BoundField HeaderText="번호" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="4%" />
						</asp:BoundField>
						<asp:BoundField DataField="Seq" HeaderText="Seq(X)" Visible="False" />
						<asp:TemplateField HeaderText="운동ID">
							<ItemTemplate>
								<asp:LinkButton ID="lbtn_rc" runat="server" Text='<%# Bind("Training_Id") %>'></asp:LinkButton>
							</ItemTemplate>
							<ItemStyle HorizontalAlign="Center" Width="8%" />
							<HeaderStyle CssClass="lbtn_rc" />
						</asp:TemplateField>
						<asp:BoundField DataField="Training_Dt" HeaderText="운동일">
							<ItemStyle HorizontalAlign="Center" Width="8%" />
						</asp:BoundField>
						<asp:BoundField DataField="Day_Of_Week" HeaderText="요일" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="6%" />
						</asp:BoundField>
						<asp:BoundField DataField="Start_Hour" HeaderText="Start_Hour(X)" Visible="False" />
						<asp:BoundField DataField="Start_Minute" HeaderText="Start_Minute(X)" Visible="False" />
						<asp:BoundField DataField="End_Hour" HeaderText="End_Hour(X)" Visible="False" />
						<asp:BoundField DataField="End_Minute" HeaderText="End_Minute(X)" Visible="False" />
						<asp:BoundField DataField="Training_Time" HeaderText="운동시간" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="12%" />
						</asp:BoundField>
						<asp:BoundField DataField="Training_Part" HeaderText="Training_Part(X)" Visible="False" />
						<asp:BoundField DataField="Training_Part_Nm" HeaderText="운동부위" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="22%" />
						</asp:BoundField>
						<asp:BoundField DataField="Total_Weight" HeaderText="중량" DataFormatString="{0:#,###,##0}" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Right" Width="8%" />
						</asp:BoundField>
						<asp:BoundField DataField="Total_Count" HeaderText="반복횟수" DataFormatString="{0:#,###,##0}" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Right" Width="8%" />
						</asp:BoundField>
						<asp:BoundField DataField="Total_Set" HeaderText="세트" DataFormatString="{0:#,###,##0}" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Right" Width="7%" />
						</asp:BoundField>
						<asp:BoundField DataField="Location" HeaderText="장소" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Left" Width="10%" />
						</asp:BoundField>
						<asp:BoundField DataField="Result" HeaderText="결과" HtmlEncode="False" >
							<ItemStyle HorizontalAlign="Center" Width="5%" />
						</asp:BoundField>
					</Columns>
					<EmptyDataTemplate>
						<div id="no_data"></div>
					</EmptyDataTemplate>
				</asp:GridView>
				<!-- 리스트 끝 -->
			</td>
		</tr>
		<tr>
			<td>
				<!-- 페이징 시작 -->
				<div class="div_left">Result : <asp:label id="lbl_result_count" runat="server"></asp:label></div>
				<div class="div_right"><asp:label id="lbl_page" runat="server"></asp:label></div>
				<!-- 페이징 끝 -->
			</td>
		</tr>
		</table>			
		<!-- 리스트셋 끝 -->
		<div id="div_search_training_part" class="div_scroll div_multi_box" style="display:none;height:156px;width:120px;position:absolute;overflow-y:auto;">
			<asp:CheckBoxList id="cbl_search_training_part" runat="server" RepeatDirection="Vertical" CssClass="cbl_vertical"></asp:CheckBoxList>
		</div>
		<div id="div_search_training_type" class="div_scroll div_multi_box" style="display:none;height:200px;width:224px;position:absolute;overflow-y:auto;">
			<asp:CheckBoxList id="cbl_search_training_type" runat="server" RepeatDirection="Vertical" CssClass="cbl_vertical"></asp:CheckBoxList>
		</div>
		<!-- 설명 시작 -->
		<ucComment:Comment id="Comment" TagPrefixs="Fit1011m" runat="server"></ucComment:Comment>
		<!-- 설명 끝 -->
		<!-- 카피라이트 시작 -->
		<ucCopyright:Copyright id="Copyright" runat="server"></ucCopyright:Copyright>
		<!-- 카피라이트 끝 -->
		<!-- 히든값 시작 -->
		<div id="hdn_data">
			<asp:label id="lbl_pk" runat="server"></asp:label>
			<asp:Label id="lbl_search_flag" runat="server"></asp:Label>
			<input id="h_no" type="hidden" name="h_no" runat="server" />
			<input id="h_scroll_pos" type="hidden" name="h_scroll_pos" value="0" runat="server" />
			<asp:linkbutton id="lbtn_init_detail" runat="server" OnClick="lbtn_init_detail_Click" />
			<asp:linkbutton id="lbtn_chg_mode" runat="server" OnClick="lbtn_chg_mode_Click" />
		</div>
		<!-- 히든값 끝 -->
		<!-- CalendarExtender -->
		<act:CalendarExtender ID="ce_search_training_dt_from" 
			TargetControlID="txt_search_training_dt_from"
			Format="yyyy-MM-dd"
			PopupButtonID="ci_search_training_dt_from"
			EnableViewState="False"
			CssClass="calendar"
			runat="server" />
		<act:CalendarExtender ID="ce_search_training_dt_to" 
			TargetControlID="txt_search_training_dt_to"
			Format="yyyy-MM-dd"
			PopupButtonID="ci_search_training_dt_to"
			EnableViewState="False"
			CssClass="calendar"
			runat="server" />
		<act:CalendarExtender ID="ce_training_dt" 
			TargetControlID="txt_training_dt"
			Format="yyyy-MM-dd"
			PopupButtonID="ci_training_dt"
			EnableViewState="False"
			CssClass="calendar"
			runat="server" />
		</ContentTemplate>
		</asp:UpdatePanel>
		<!-- AJAX 끝 -->
	</td>
</tr>
</table>

<asp:updateprogress AssociatedUpdatePanelID="UpdatePanel1" ID="updateProgress" runat="server">
	<progresstemplate>
		<div id="progressBackgroundFilter"></div>
		<div id="processMessage">
			<div id="processing"></div>
			<img src="../Common/Images/processing_img.gif" />
		</div>
	</progresstemplate>
</asp:updateprogress>

</form>
<script type="text/javascript" language="javascript" defer="defer">
	//검색
	function chkSearch(evt) {
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		//날짜형식
		if (!isDateHyphen($F("txt_search_training_dt_from"))) {
			msgBox.alert(getMsg(MSG_ERR_082), setFocus, "txt_search_training_dt_from", keyCode); //잘못된 날짜형식입니다.(YYYY-MM-DD)
			return false;
		}
		if (!isDateHyphen($F("txt_search_training_dt_to"))) {
			msgBox.alert(getMsg(MSG_ERR_082), setFocus, "txt_search_training_dt_to", keyCode); //잘못된 날짜형식입니다.(YYYY-MM-DD)
			return false;
		}

		//날짜순서
		if (!isDateSeq($F("txt_search_training_dt_from"), $F("txt_search_training_dt_to"))) {
			msgBox.alert(getMsg(MSG_ERR_022), null, null, keyCode); //시작일자가 종료일자보다 늦을수 없습니다
			return false;
		}
		return true;
	}

	//엔터검색
	function enterSearchOnPage(evt) {
		var e = (!evt) ? window.event : evt;
		var keyCode = e.keyCode;

		if (keyCode == 13) {
			if (chkSearch(evt)) {
				__doPostBack('ibtn_search', '');
			}
		}
	}

	//디테일 초기화
	function initDetail() {
		__doPostBack('lbtn_init_detail', '');
	}

	//페이지모드 변경
	function chgMode() {
		__doPostBack('lbtn_chg_mode', '');
	}

	//저장
	function chkSave() {
		if ($F("txt_training_dt").blank()) {
			msgBox.alert(getMsg(MSG_ERR_201), setFocus, "txt_training_dt"); //운동일을 입력해 주세요
			return false;
		}

		//시간순서
		if ($F("ddl_start_hour") + $F("ddl_start_minute") > $F("ddl_end_hour") + $F("ddl_end_minute")) {
			msgBox.alert(getMsg(MSG_ERR_209), null, null); //시작시간이 종료시간보다 늦을수 없습니다
			return false;
		}

		var pk = $get("lbl_pk").innerHTML;
		var MSG_ID = (pk == "") ? MSG_CFM_000 : MSG_CFM_028; //저장/수정
		msgBox.confirm(getMsg(MSG_ID), doSave); //XX하시겠습니까?

		return false;
	}

	//삭제
	function chkDelete() {
		if (!isCheckedOnGridView("GridView1", 0)) {
			msgBox.alert(getMsg(MSG_ERR_053)); //삭제할 항목을 선택하세요
			return false;
		}
		msgBox.confirm(getMsg(MSG_CFM_001), doDelete); //삭제하시겠습니까?
		return false;
	}

	//변경
	function chkChange() {
		var training_id = $("lbl_training_id").innerHTML;
		goFitMgtChangePage(training_id);
	}

	//onscroll 이벤트 발생시 스크롤바 위치값 실시간 저장
	function setScroll(val) {
		$("h_scroll_pos").value = val.scrollTop;
	}

	//코드비하인드에서 RegisterStartupScript 메서드를 사용해 호출할 스크롤 위치 셋팅 함수
	function scrollTo() {
		var vScrollPos = $F("h_scroll_pos");  // PostBakc 발생전 스크롤바 위치값
		$("div_detail_2").scrollTop = vScrollPos;  // GridView를 감싼 Div 컨트롤의 scrollTop 속성값 셋팅
	}

	//비고 전체보기
	function extendRemark(remark_id, extend_id) {
		var h = 12;
		if ($(extend_id).checked)
		{
			h = 80;
		}
		$(remark_id).style.height = h + "px";
	}

</script>
</body>
</html>